﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Twillo.Core.Forms
{
    public partial class frmAccessGrant : Form
    {

        public string AccessPin { get { return txtPin.Text; } }

        public frmAccessGrant()
        {
            InitializeComponent();
        }

        private void frmAccessGrant_Load(object sender, EventArgs e)
        {
            txtPin.Text = "";
            btnOK.Enabled = false;
            txtPin.Focus();
        }

        private void txtPin_TextChanged(object sender, EventArgs e)
        {
            btnOK.Enabled = !string.IsNullOrEmpty(txtPin.Text.Trim());
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Close();
        }
    }
}
